import { type ToastOptions } from 'vant'

let LoadingRef: any

export const openLoading = (conf?: ToastOptions) => {
  LoadingRef = showLoadingToast({
    duration: 0,
    message: 'Loading',
    ...conf,
  })
}

export const closeLoading = () => {
  LoadingRef.close()
}
